package com.tuanzi.loan.web.lazy.statistics;

import com.tuanzi.loan.business.service.statistics.NewOneKeyStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.newonekey.NewOneKeyStatRequest;
import com.tuanzi.loan.vo.response.statistics.newonekey.NewOneKeyStatTotalResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-06-30 15:55
 */
public class NewOneKeyTotalStatLazyDataModel extends BaseLazyDataModel<NewOneKeyStatRequest, NewOneKeyStatTotalResponse> {
    private NewOneKeyStatService newOneKeyStatService = SpringContextHolder.getBean(NewOneKeyStatService.class);
    public NewOneKeyTotalStatLazyDataModel(NewOneKeyStatRequest newOneKeyStatRequest) {
        super(newOneKeyStatRequest);
    }

    @Override
    protected Page<NewOneKeyStatTotalResponse> doLoad(PageSearcher<NewOneKeyStatRequest> pageSearcher) {
        return newOneKeyStatService.totalList(pageSearcher);
    }
}
